package cn.lger.icollege.service;

import cn.lger.icollege.dao.ClassRoomDao;
import cn.lger.icollege.entity.Classroom;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Code that Changed the World
 * Pro said
 * Created by Pro on 2018-05-19.
 */
@Service
public class ClassroomService {

    @Resource
    private ClassRoomDao classRoomDao;

    public List<Classroom> findAll(){
        return classRoomDao.findAll();
    }

    @Transactional
    public void deleteClassroomById(long classId) {
        classRoomDao.deleteById(classId);
    }
}
